<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    <title>JFinal Controller renderError案例</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">   
	<meta http-equiv="keywords" content="JFinal,JFinal视频教程,JFinal极速开发实战教程,小木学堂">
	<meta http-equiv="description" content="小木学堂-最专业的JFinal极速开发实战教程">
	<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/bootstrap-theme.min.css">
<!-- 本案例自定义css样式表 -->
<link rel="stylesheet" href="assets/css/xmxt.css">
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.min.js"></script> 
<style type="text/css">
	 a{
		display: block;
	}
	 a:hover{
		color:red;
	}
	a:active{
		color:blue;
	}
</style>
  </head>
  
  <body>
   <div class="header">
  <div class="container">
    <div class="row">
      <div class="col-xs-12">
      <div class="logotxt shadowfont"><h1>JFinal极速开发实战教程</h1></div> 
      <h2 class="text-center shadowfont">小木学堂</h2>
    </div>
  </div>
</div>
</div>
   <div class="container" style="background: #FFF;min-height: 700px;">
   <div class="page-header">
   <h1>JFinal Controller renderError案例</h1>
   </div>
   <div class="row">
   <div class="col-lg-12 col-md-12 col-sm-12">
  <fieldset>
  <legend>renderError()</legend>
  <label>JFinal中的一个bug renderError(404,"404error.html") 默认应该404error.html的路径是我们设置的action的viewpath JFinal新版本会修复<br/>
  <a target="_blank" class="btn btn-warning pull-right" href="http://www.oschina.net/question/374_225384">点击查看bug详解</a>
  </label>
   <ol>
   <li><a href="/rendererror/test1" target="_blank">HTTP 404 error 调用[renderError(404);]</a></li>
   <li><a href="/rendererror/test2" target="_blank">HTTP 404 error 调用[renderError(404,"404error.html");]</a></li>
   <li><a href="/rendererror/test3" target="_blank">HTTP 404 error 调用[renderError(404,"/rendererror/404error.html");]</a></li>
   <li><a href="/rendererror/test4" target="_blank">HTTP 404 error 调用[renderError(404,"/WEB-INF/view/rendererror/404error.html");]</a></li>
   <li><a href="/rendererror/test5" target="_blank">HTTP 404 error 调用[renderError(404, new JspRender("404error.html"));]</a></li>
   <li><a href="/rendererror/test6" target="_blank">HTTP 404 error 调用[renderError(404, new JspRender("/WEB-INF/view/rendererror/404error.html"));]</a></li>
   </ol>
  </fieldset>
  <fieldset>
  <legend>render()</legend>
   <ol>
   <li><a href="/rendererror/test7" target="_blank">HTTP 404 error 调用[render("404error.html",404);]</a></li>
   <li><a href="/rendererror/test8" target="_blank">HTTP 404 error 调用[render("/WEB-INF/view/rendererror/404error.html",404);]</a></li>
   </ol>
  </fieldset>
  <fieldset>
  <legend>HTTP 404 403 500 501....</legend>
   <ol>
   <li><a href="/rendererror/test1" target="_blank">HTTP 404 error 调用[renderError(404);]</a></li>
   <li><a href="/rendererror/test9" target="_blank">HTTP 400 error 调用[renderError(400);]</a></li>
   <li><a href="/rendererror/test10" target="_blank">HTTP 401 error 调用[renderError(401);]</a></li>
   <li><a href="/rendererror/test11" target="_blank">HTTP 403 error 调用[renderError(403);]</a></li>
   <li><a href="/rendererror/test12" target="_blank">HTTP 500 error 调用[renderError(500);]</a></li>
   </ol>
  </fieldset>
  </div>
   </div>
   </div>
   <jsp:include page="../footer.jsp"></jsp:include>
